package com.neusoft.bizcore.auth.dto;

import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.dto.AbstractDTO;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class AuthRoleCreateUpdateDTO extends AbstractDTO {

    private static final long serialVersionUID = 1L;

    /** 角色名 */
    @NotBlank(message = "角色名不能为空")
    @Length(max = 50, message = "角色名不能超过{max}位")
    private String name;

    /** 角色编码 */
    @NotBlank(message = "角色编码不能为空")
    @Length(max = 255, message = "角色编码不能超过{max}位")
    private String code;

    /** 权限 */
    private List<String> permissions = new ArrayList<>();

}
